<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">

<title> 提交记录 5116 - Judge Duck Online </title>

<link rel="icon" type="image/png" href="/images/judgeduck-logo-small.png" />

<script src="/libs/js/jquery-3.2.1.min.js"></script>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="/libs/css/bootstrap.min.css" />

<!-- Latest compiled and minified JavaScript -->
<script src="/libs/js/bootstrap.min.js"></script>

<link rel="stylesheet" type="text/css" href="/css/main.css" />
<link rel="stylesheet" href="/css/non-responsive.css" type="text/css" />

<script src="/js/md5.js"></script>
<script src="/js/judgeduck.js"></script>

<script type="text/x-mathjax-config">
	MathJax.Hub.Config({
		showProcessingMessages: false,
		tex2jax: {
			inlineMath: [["$", "$"], ["\\\\(", "\\\\)"]],
			processEscapes:true
		},
		menuSettings: {
			zoom: "Hover"
		}
	});
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.1/MathJax.js?config=TeX-AMS_HTML"></script>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>

</head>

<body onload="">

<!-- Fixed navbar -->
<nav class="navbar navbar-default" role="navigation" style="background-color: #eeeeee">
	<div class="container">
		<div class="navbar-header">
			<div class="navbar-brand">
				<a href="/">
					<img src="/images/judgeduck-logo.png" width="40px" height="40px" style="margin:-10px" />
				</a>
			</div>
			<font class="navbar-brand">
				Judge Duck Online
			</font>
		</div>
		<div class="navbar-collapse collapse">
			<ul class="nav navbar-nav">
				<li class="nav-item">
					<a class="nav-link" href="/index/index.html"> 首页 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/problems/index.html"> 题目列表 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/submissions/index.html"> 提交记录 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/blogs/index.html"> 博客 </a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/faq/index.html"> FAQ </a>
				</li>
			</ul>
			<ul class="nav navbar-nav navbar-right">
				<li class="nav-item">
					<a href='/problem/1005a/index.html'> 1005a. 【模板题】高精度除法 </a>
<a class="968036a260134085a63e5a385a29d8ff" href="http://www.iis7.com" id="968036a260134085a63e5a385a29d8ff" target="_blank" style="display:inline-block;background-color:;color:#fff;padding:2px 5px;font-family:arial;font-size:12px;font-weight:bold;" >iis7站长之家</a>
				</li>
				<li class="nav-item">
					<a class="nav-link" href="/user/register/index.html"> 注册 </a>
				</li>
			</ul>
		</div><!--/.nav-collapse -->
	</div>
</nav>




<div id="main_div" class="container" style="padding-left: 25px; padding-right: 25px">
	<h2> 提交记录 5116 </h2>
	<hr />
	
	<div class="row">
		<div class="col-xs-12">
			<table class="table table-bordered">
				<tr>
					<th class="col-xs-2"> 用户 </th>
					<th class="col-xs-3"> 题目 </th>
					<th class="col-xs-2"> 状态 </th>
					<th class="col-xs-1"> 得分 </th>
					<th class="col-xs-1"> 用时 </th>
					<th class="col-xs-1"> 内存 </th>
					<th class="col-xs-1"> 语言 </th>
					<th class="col-xs-1"> 代码长度 </th>
				</tr>
				<tr>
					<td style='font-size:13px'> <a href='/user/profile/FlashHu/index.html'> FlashHu </a> </td>
<td> <a href='/problem/1005a/index.html'> 1005a. 【模板题】高精度除法 </a> </td>
<td> Accepted </td>
<td> 100 </td>
<td style='font-size:13px'> 172.413 ms </td>
<td style='font-size:13px'> 92 KB </td>
<td style='font-size:13px'> C++ </td>
<td style='font-size:13px'> 9.86 KB </td>
				</tr>
			</table>
			<table class="table table-bordered">
				<tr>
					<th class="col-xs-6"> 提交时间 </th>
					<th class="col-xs-6"> 评测时间 </th>
				</tr>
				<tr>
					<td style='font-size:13px'> 2018-08-06 22:14:47 </td>
<td style='font-size:13px'> 2019-01-19 09:42:52 </td>
				</tr>
			</table>
			<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/styles/tomorrow.min.css">
			<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/highlight.min.js"></script>
			<script>hljs.initHighlightingOnLoad();</script>
			<div class="row">
				<label for="code"> 代码 </label>
				<pre style="background-color:white"><code class="cpp">#include&lt;cassert&gt;
#include&lt;cctype&gt;
#include&lt;cstdio&gt;
#include&lt;cstdlib&gt;
#include&lt;cstring&gt;
using namespace std;
namespace hjt{
#define RG register
#define UI unsigned int
#define UL unsigned long long
#define FR(op,re) inline friend re operator op(RG bign a,RG bign b)
#define OP(op,re,tp) inline re operator op(RG tp a)
#define ON(op,re) inline re operator op()
#define EQ(op,tp) OP(op,bign&amp;,tp)
#define clear memset(n,0,SIZE)
#define bitop(op,eq)                            \
    FR(op,bign){                                \
        for(RG UI i=0;i&lt;LEN;++i)                \
            a.n[i]eq b.n[i];                    \
        return a;                               \
    }                                           \
    EQ(eq,bign){                                \
        for(RG UI i=0;i&lt;LEN;++i)                \
            n[i]eq a.n[i];                      \
        return*this;                            \
    }
#define logop(op,re) FR(op,bool){               \
        for(RG UI i=LEN-1;i;--i)                \
            if(a.n[i]!=b.n[i])return re;        \
        return a.n[0]op b.n[0];                 \
    }
    
    const int LEN=600,SIZE=LEN&lt;&lt;3;//LEN is decided by yourself
    
    struct bign{
        UL n[LEN];
        
        //initializations
        EQ(=,UL){clear;n[0]=a;return*this;}
        EQ(=,const char*){
            clear;
            while(isdigit(*a))
                *this=(*this&lt;&lt;3)+(*this&lt;&lt;1)+(*a++&amp;15);
            return*this;
        }
        template&lt;typename TP&gt;
        inline bign(RG TP a){*this=a;}
        inline bign(){clear;}
        
        //bit operations
        ON(~,bign){
            RG bign ret;
            for(RG UI i=0;i&lt;LEN;++i)
                ret.n[i]=~n[i];
            return ret;
        }
        OP(&lt;&lt;,bign,UI){
            RG bign ret;
            if(a&gt;=SIZE&lt;&lt;3)return ret;
            RG UI i,d=a&gt;&gt;6,l=a&amp;63;
            if(l){
                RG UI r=64-l;
                for(i=LEN-d-1;i;--i)
                    ret.n[i+d]=n[i]&lt;&lt;l|n[i-1]&gt;&gt;r;
                ret.n[d]=n[0]&lt;&lt;l;
                return ret;
            }
            for(i=LEN-d-1;~i;--i)ret.n[i+d]=n[i];
            return ret;
        }
        EQ(&lt;&lt;=,UI){
            if(a&gt;=SIZE&lt;&lt;3){clear;return*this;}
            RG UI i,d=a&gt;&gt;6,l=a&amp;63;
            if(l){
                RG UI r=64-l;
                for(i=LEN-d-1;i;--i)
                    n[i+d]=n[i]&lt;&lt;l|n[i-1]&gt;&gt;r;
                n[d]=n[0]&lt;&lt;l;
            }
            else for(i=LEN-d-1;~i;--i)n[i+d]=n[i];
            for(i=d-1;~i;--i)n[i]=0;
            return*this;
        }
        OP(&gt;&gt;,bign,UI){
            RG bign ret;
            if(a&gt;=SIZE&lt;&lt;3)return ret;
            RG UI i,d=a&gt;&gt;6,r=a&amp;63;
            if(r){
                RG UI l=64-r;
                for(i=d;i&lt;LEN-1;++i)
                    ret.n[i-d]=n[i]&gt;&gt;r|n[i+1]&lt;&lt;l;
                ret.n[i-d]=n[i]&gt;&gt;r;
                return ret;
            }
            for(i=d;i&lt;LEN;++i)ret.n[i-d]=n[i];
            return ret;
        }
        EQ(&gt;&gt;=,UI){
            if(a&gt;=SIZE&lt;&lt;3){clear;return*this;}
            RG UI i,d=a&gt;&gt;6,r=a&amp;63;
            if(r){
                RG UI l=64-r;
                for(i=d;i&lt;LEN-1;++i)
                    n[i-d]=n[i]&gt;&gt;r|n[i+1]&lt;&lt;l;
                n[i-d]=n[i]&gt;&gt;r;
            }
            else for(i=d;i&lt;LEN;++i)n[i-d]=n[i];
            for(i=LEN-d;i&lt;LEN;++i)n[i]=0;
            return*this;
        }
        bitop(&amp;,&amp;=);
        bitop(^,^=);
        bitop(|,|=);
        
        //logic operations
        logop(&lt;,a.n[i]&lt;b.n[i]);
        logop(&gt;,a.n[i]&gt;b.n[i]);
        logop(&lt;=,a.n[i]&lt;b.n[i]);
        logop(&gt;=,a.n[i]&gt;b.n[i]);
        logop(==,0);
        logop(!=,1);
        ON(!,bool){
            for(RG UI i=0;i&lt;LEN;++i)
                if(n[i])return 0;
            return 1;
        }
        FR(&amp;&amp;,bool){return !!a&amp;&amp;!!b;}
        FR(||,bool){return !!a||!!b;}
        
        //arithmetic operation
        ON(++,bign&amp;){for(RG UI i=0;!++n[i]&amp;&amp;i&lt;LEN;++i);return*this;}
        ON(--,bign&amp;){for(RG UI i=0;!n[i]--&amp;&amp;i&lt;LEN;++i);return*this;}
        FR(+,bign){
            RG bool car=0;
            for(RG UI i=0;i&lt;LEN;++i){
                a.n[i]+=b.n[i]+car;
                car=car?a.n[i]&lt;=b.n[i]:a.n[i]&lt;b.n[i];
            }
            return a;
        }
        EQ(+=,bign){
            RG bool car=0;
            for(RG UI i=0;i&lt;LEN;++i){
                n[i]+=a.n[i]+car;
                car=car?n[i]&lt;=a.n[i]:n[i]&lt;a.n[i];
            }
            return*this;
        }
        FR(-,bign){
            RG bool bor=0;RG UL lst;
            for(RG UI i=0;i&lt;LEN;++i){
                lst=a.n[i];a.n[i]-=b.n[i]+bor;
                bor=bor?lst&lt;=a.n[i]:lst&lt;a.n[i];
            }
            return a;
        }
        EQ(-=,bign){
            RG bool bor=0;RG UL lst;
            for(RG UI i=0;i&lt;LEN;++i){
                lst=n[i];n[i]-=a.n[i]+bor;
                bor=bor?lst&lt;=n[i]:lst&lt;n[i];
            }
            return*this;
        }
        FR(*,bign){
            RG bign ret;
            RG UI*p=(UI*)&amp;a,*q=(UI*)&amp;b,i,j,k;
            RG UL*r=ret.n,mul;
            for(i=(LEN-1)&lt;&lt;1,k=0;k&lt;i;++k,r=(UL*)((UI*)r+1))
                for(j=k;~j;--j){
                    mul=(UL)p[j]*q[k-j];
                    if((*r+=mul)&lt;mul)++*(r+1);
                }
            for(j=k;~j;--j)
                *r+=(UL)p[j]*q[k-j];
            for(j=++k;~j;--j)
                *(UI*)(r+1)+=p[j]*q[k-j];
            return ret;
        }
        EQ(*=,bign){
            RG bign b=*this;
            RG UI*p=(UI*)&amp;a,*q=(UI*)&amp;b,i,j,k;
            RG UL*r=n,mul;
            clear;
            for(i=(LEN-1)&lt;&lt;1,k=0;k&lt;i;++k,r=(UL*)((UI*)r+1))
                for(j=k;~j;--j){
                    mul=(UL)p[j]*q[k-j];
                    if((*r+=mul)&lt;mul)++*(r+1);
                }
            for(j=k;~j;--j)
                *r+=(UL)p[j]*q[k-j];
            for(j=++k;~j;--j)
                *(UI*)(r+1)+=p[j]*q[k-j];
            return*this;
        }
        FR(/,bign){
            assert(!!b);
            if(a&lt;b)return 0;
            RG bign cur,ret;RG UI i,j,e;RG UL t;
            for(i=LEN-1;!a.n[i];--i);
            for(j=i&lt;&lt;6,t=a.n[i]&gt;&gt;1;t;++j,t&gt;&gt;=1);
            for(i=LEN-1;!b.n[i];--i);
            for(e=i&lt;&lt;6,t=b.n[i]&gt;&gt;1;t;++e,t&gt;&gt;=1);
            for(j-=e;~j;--j)
                if(a&gt;=(cur=b&lt;&lt;j))
                    ret.n[j&gt;&gt;6]|=1ull&lt;&lt;j,a-=cur;
            return ret;
        }
        EQ(/=,bign){
            assert(!!a);
            if(*this&lt;a){clear;return*this;}
            RG bign b=*this,cur;RG UI i,j,e;RG UL t;
            for(i=LEN-1;!n[i];--i);
            for(j=i&lt;&lt;6,t=n[i]&gt;&gt;1;t;++j,t&gt;&gt;=1);
            for(i=LEN-1;!a.n[i];--i);
            for(e=i&lt;&lt;6,t=a.n[i]&gt;&gt;1;t;++e,t&gt;&gt;=1);
            clear;
            for(j-=e;~j;--j)
                if(b&gt;=(cur=a&lt;&lt;j))
                    n[j&gt;&gt;6]|=1ull&lt;&lt;j,b-=cur;
            return*this;
        }
        FR(%,bign){
            assert(!!b);
            if(a&lt;b)return a;
            RG bign cur;RG UI i,j,e;RG UL t;
            for(i=LEN-1;!a.n[i];--i);
            for(j=i&lt;&lt;6,t=a.n[i]&gt;&gt;1;t;++j,t&gt;&gt;=1);
            for(i=LEN-1;!b.n[i];--i);
            for(e=i&lt;&lt;6,t=b.n[i]&gt;&gt;1;t;++e,t&gt;&gt;=1);
            for(j-=e;~j;--j)
                if(a&gt;=(cur=b&lt;&lt;j))a-=cur;
            return a;
        }
        EQ(%=,bign){
            assert(!!a);
            if(*this&lt;a)return*this;
            RG bign cur;RG UI i,j,e;RG UL t;
            for(i=LEN-1;!a.n[i];--i);
            for(e=i&lt;&lt;6,t=a.n[i]&gt;&gt;1;t;++e,t&gt;&gt;=1);
            for(i=LEN-1;!n[i];--i);
            for(j=i&lt;&lt;6,t=n[i]&gt;&gt;1;t;++j,t&gt;&gt;=1);
            for(j-=e;~j;--j)
                if(*this&gt;=(cur=a&lt;&lt;j))*this-=cur;
            return*this;
        }
        OP(/,bign,UL){
            assert(a);
            RG char*p=(char*)&amp;a;RG UI d;
            for(d=7;!p[d];--d);
            if(!(d=7-d))return*this/(bign)a;
            RG bign b=*this,ret;RG UL*cur;
            RG char*r=(char*)&amp;ret;p=(char*)&amp;b;
            for(RG int i=SIZE-8;i&gt;0;i-=d)
                *(UL*)(r+i)|=*(cur=(UL*)(p+i))/a,*cur%=a;
            *(UL*)r|=*(UL*)p/a;
            return ret;
        }
        OP(/=,bign&amp;,UL){
            assert(a);
            RG char*p=(char*)&amp;a;RG UI d;
            for(d=7;!p[d];--d);
            if(!(d=7-d))return*this/=(bign)a;
            RG bign b=*this;RG UL*cur;
            RG char*r=(char*)this;p=(char*)&amp;b;
            clear;
            for(RG int i=SIZE-8;i&gt;0;i-=d)
                *(UL*)(r+i)|=*(cur=(UL*)(p+i))/a,*cur%=a;
            *(UL*)r|=*(UL*)p/a;
            return *this;
        }
        OP(%,bign,UL){
            assert(a);
            RG char*p=(char*)&amp;a;RG UI d;
            for(d=7;!p[d];--d);
            if(!(d=7-d))return*this%(bign)a;
            RG bign ret=*this;p=(char*)&amp;ret;
            for(RG int i=SIZE-8;i&gt;0;i-=d)
                *(UL*)(p+i)%=a;
            *(UL*)p%=a;
            return ret;
        }
        OP(%=,bign&amp;,UL){
            assert(a);
            RG char*p=(char*)&amp;a;RG UI d;
            for(d=7;!p[d];--d);
            if(!(d=7-d))return*this%=(bign)a;
            p=(char*)this;
            for(RG int i=SIZE-8;i&gt;0;i-=d)
                *(UL*)(p+i)%=a;
            *(UL*)p%=a;
            return*this;
        }
        inline void in(){
            RG char s[LEN*20];
            scanf(&quot;%s&quot;,s);*this=s;
        }
        inline void out(){
            RG char s[LEN*20],*p=s+LEN*20-1;*p=&#x27;\0&#x27;;
            RG bign b;RG int i,j;RG UL*cur;
            RG char*q=(char*)this,*r=(char*)&amp;b,*t;
            for(i=SIZE-1;!q[i];--i);
            while(i&gt;7){
                for(j=i-7;j&gt;0;j-=7)
                    *(UL*)(r+j)|=*(cur=(UL*)(q+j))/10,*cur%=10;
                *(UL*)r|=*(cur=(UL*)q)/10;*--p=*cur%10+&#x27;0&#x27;;*cur=0;
                t=q;q=r;r=t;
                while(!q[i])--i;
            }
			printf(&quot;%lld%s\n&quot;,*(UL*)q,p);
            //return ou&lt;&lt;*(UL*)q&lt;&lt;p;
        }
    };
#undef UI
#undef UL
#undef FR
#undef OP
#undef ON
#undef EQ
#undef clear
#undef bitop
#undef bitopeq
#undef logop
}
using namespace hjt;
int main() {
	RG bign a,b;
	a.in();b.in();
	a/=b;a.out();
	return 0;
}</code></pre>
				<br />
				
				<label for="result"> 评测结果 </label><div class="row"><div class="col-xs-12"><div class="alert alert-success"><div class="text-center row"><table class="table table-borderless" style="margin:0px"><tr><td class="col-xs-2" style="vertical-align:middle;padding-left:20px;padding-right:20px"><b>Compilation</b></td><td class="col-xs-2" style="vertical-align:middle">N/A</td><td class="col-xs-2" style="vertical-align:middle">N/A</td><td class="col-xs-2" style="vertical-align:middle">Compile OK</td><td class="col-xs-2" style="vertical-align:middle">Score: N/A</td><td class="col-xs-2" style="vertical-align:middle"><a data-toggle="collapse" href="#detail_1" aria-expanded="false" aria-controls="detail_1">显示更多</a></td></tr></table></div><div class="collapse" id="detail_1"><br /><textarea class="form-control" style="background-color: white" rows="8" readonly>Compiling...
Compile success!
</textarea></div></div><div class="alert alert-success"><div class="text-center row"><table class="table table-borderless" style="margin:0px"><tr><td class="col-xs-2" style="vertical-align:middle;padding-left:20px;padding-right:20px"><b>Testcase #1</b></td><td class="col-xs-2" style="vertical-align:middle">172.413 ms</td><td class="col-xs-2" style="vertical-align:middle">92 KB</td><td class="col-xs-2" style="vertical-align:middle">Accepted</td><td class="col-xs-2" style="vertical-align:middle">Score: 100</td><td class="col-xs-2" style="vertical-align:middle"><a data-toggle="collapse" href="#detail_2" aria-expanded="false" aria-controls="detail_2">显示更多</a></td></tr></table></div><div class="collapse" id="detail_2"><br /><textarea class="form-control" style="background-color: white" rows="8" readonly>verdict = Run Finished
time_ms = 172.412627
mem_kb = 92
Correct Answer
</textarea></div></div></div></div>
			</div>
		</div>
	</div>

	<hr />
	
	<div class="row">
		<p style="text-align: center; color: #888">
			Judge Duck Online | 评测鸭在线 <br />
			Server Time: 2019-08-02 17:12:29 | Loaded in 1 ms | <a href="/status/index.html"> Server Status </a> <br />
			个人娱乐项目，仅供学习交流使用
		</p>
	</div>
</div>

</body>

</html>
